﻿function lsjRight(str, n) {
    return str.substring(str.length - n);
}

function lsjYMD(date) {
    var y = date.getFullYear();
    var m = lsjRight('0' + (date.getMonth() + 1), 2);
    var d = lsjRight('0' + date.getDate(), 2);
    return y + '-' + m + '-' + d;
}

function 새로고침콜백() {
    location.reload();
}

function 임시메시지(message, duration) {
    var div = document.createElement("div");
    div.setAttribute("style", "position:absolute;top:40%;left:20%;background-color:red;");
    div.innerHTML = message;
    setTimeout(function () { $(div).remove(); }, duration);
    $('body').append(div);
}
